Skip to content

feat(website): make error tooltip direction configurable in AdvancedQueryFilter - #1204

Merged
fhennig merged 2 commits into
mainfrom
feat/error-tooltip-direction
May 14, 2026
Merged

feat(website): make error tooltip direction configurable in AdvancedQueryFilter#1204
fhennig merged 2 commits into
mainfrom
feat/error-tooltip-direction

Conversation

@fhennig

@fhennig fhennig commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an optional errorTooltipClass prop to AdvancedQueryFilter that is forwarded to the internal ErrorIconWithTooltip component, allowing callers to control which direction the validation error tooltip opens.
  • Defaults to 'tooltip-left lg:tooltip-right' (the original hardcoded value), so all existing usages are unchanged.

Design note

We considered using an explicit union type ('left' | 'right' | 'top' | 'bottom') with a lookup map to avoid Tailwind purging dynamic class names. However, that approach would have made it impossible for callers to pass responsive variants like tooltip-left lg:tooltip-right without introducing extra complexity. Accepting a plain class string keeps full flexibility — callers are responsible for using complete Tailwind class names so the compiler can detect them.

Screenshot

With tooltip-top

image

Test plan

  • Existing pages with AdvancedQueryFilter show the tooltip in the same position as before (left on small screens, right on large screens)
  • A caller passing e.g. errorTooltipClass="tooltip-top" sees the tooltip pinned top at all breakpoints

🤖 Generated with Claude Code

…ueryFilter

Adds an optional `errorTooltipClass` prop to `AdvancedQueryFilter` (and
the internal `ErrorIconWithTooltip`) so callers can control which
direction the validation error tooltip opens. Defaults to the original
`tooltip-left lg:tooltip-right` so existing usages are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment May 8, 2026 4:30pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new optional prop to AdvancedQueryFilter to let callers control the direction (and responsive behavior) of the validation error tooltip by forwarding a custom tooltip direction class string down to the internal tooltip component, preserving the existing default behavior.

Changes:

  • Added an optional errorTooltipClass?: string prop to AdvancedQueryFilter.
  • Forwarded errorTooltipClass into ErrorIconWithTooltip, which now accepts an optional tooltipClass and defaults to the prior hardcoded direction classes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 109 to +111
{isValidating && <span className='loading loading-spinner loading-xs' title='Validating' />}
{isValid && <div className='iconify mdi--check text-success size-4' title='Advanced query is valid' />}
{isError && <ErrorIconWithTooltip message={validationState.message} />}
{isError && <ErrorIconWithTooltip message={validationState.message} tooltipClass={errorTooltipClass} />}
@fhennig
fhennig merged commit 7abef95 into main May 14, 2026
14 checks passed
@fhennig
fhennig deleted the feat/error-tooltip-direction branch May 14, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants